package mythreadpool;

public class Demo {
    public static void main(String[] args) throws InterruptedException {
        MyThreadPool pool = new MyThreadPool(4);
        for (int i = 0; i < 1000; i++) {
            pool.submit(new Runnable() {
                @Override
                public void run() {
                    // 要执⾏的⼯作
                    System.out.println(Thread.currentThread().getName() + "hello");
                }
            });
        }
    }
}